s = input("请输入字符串：")

countCh = 0
numCount = 0
spaceCount = 0
otherCount = 0

for ch in s:
    res = ord(ch)
    if 97<=res<=122:
        countCh = countCh+1
    elif 48<=res<=57:
        numCount = numCount+1
    elif res == 32:
        spaceCount = spaceCount+1
    else:
        otherCount = otherCount+1
print(countCh,numCount,spaceCount,otherCount)